package com.carkeeper.service.serviceFallback;

import com.carkeeper.dto.OrderDTO;
import com.carkeeper.service.OrderFeign;
import feign.hystrix.FallbackFactory;

import java.util.ArrayList;
import java.util.List;

public class OrderFallbackFactory implements FallbackFactory<OrderFeign> {
    @Override
    public OrderFeign create(Throwable throwable) {
        return new OrderFeign() {
            @Override
            public OrderDTO getOrder(Long id) {
                return null;
            }

            @Override
            public List<OrderDTO> findAll(Long storeId, String orderStatus, String payStatus) {
                return new ArrayList<>();
            }
        };
    }
}
